-
Notifications
You must be signed in to change notification settings - Fork 133
JIT (armv6m): use literal pool to reduce binary size #1903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bettio
merged 1 commit into
atomvm:main
from
pguyot:w42/armv6m-use-literal-pool-to-reduce-binary-size
Oct 31, 2025
Merged
JIT (armv6m): use literal pool to reduce binary size #1903
bettio
merged 1 commit into
atomvm:main
from
pguyot:w42/armv6m-use-literal-pool-to-reduce-binary-size
Oct 31, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1bf122a to
daa43c9
Compare
This was referenced Oct 18, 2025
daa43c9 to
933af32
Compare
This was referenced Oct 19, 2025
0e9cf40 to
0a16afa
Compare
0a16afa to
8a75e47
Compare
8a75e47 to
21e6454
Compare
- Also optimize some move immediate combinations to use 2 instructions instead of 1 instruction and a 32 bits literal - Also add flushing of stream and backends - Also add two new conditions that will be used by an incoming optimization Signed-off-by: Paul Guyot <pguyot@kallisys.net>
21e6454 to
5f2b6ce
Compare
bettio
approved these changes
Oct 31, 2025
bettio
added a commit
that referenced
this pull request
Nov 6, 2025
Embedded JIT mode for Pico Continuation of: - #1829 - #1838 - #1881 - #1891 - #1893 - #1900 - #1901 - #1903 - #1907 Add the ability to perform just in time compilation directly on Raspberry Pi Pico. Erlang bytecode is compiled to armv6m on the first run and directly executed on subsequent runs. In this PR, the native code compilation does not take advantage of being done on the device, it still generates position independent code. If Erlang modules include `Type` chunk, the same optimizations that happen on the desktop with precompilation could be done on the Pico, however current release (0.7.5) of [`packbeam`](https://github.com/atomvm/atomvm_packbeam) prunes the `Type` chunk. Just in time compilation on the Pico is achieved by: - Adding a flush call after JIT is performed, which is noop on all platforms except on armv6m where we flush the literal pool (normally a noop, though, as the pool should have been flushed earlier). - Updating avm API to fetch the last section named end. - Adding a `jit_stream_flash` for RP2 platform and adding a cache native code mechanism that rely on the avm end section on RP2 to find out where to flash jit code (after the last end) and detect if avm were updated. These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
bettio
added a commit
that referenced
this pull request
Nov 7, 2025
JIT: Optimize memory usage by rewriting jump table immediately Continuation of: - #1900 - #1901 - #1903 - #1909 These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
bettio
added a commit
that referenced
this pull request
Dec 9, 2025
Just in time compilation for riscv32 architecture Continuation of: - #1881 - #1829 - #1891 - #1838 - #1900 - #1901 - #1903 - #1981 These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of:
JIT: factorize tail calls to reduce binary size #1901
Also optimize some move immediate combinations to use 2 instructions instead
of 1 instruction and a 32 bits literal
Also add flushing of stream and backends
Also add two new conditions that will be used by an incoming optimization
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later